/*
 * Copyright (c) 2018-2999 广州市蓝海创新科技有限公司 All rights reserved.
 *
 * https://www.mall4j.com/
 *
 * 未经允许，不可做商业用途！
 *
 * 版权所有，侵权必究！
 */
package com.yami.shop.im.vo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yami.shop.common.serializer.json.ImgJsonSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/**
 * 最后的对话信息列表项
 *
 * @author FrozenWatermelon
 * @date 2020/8/18
*/
@Getter
@Setter
public class Conversation {

    @ApiModelProperty("聊天类型")
    private Integer chatType;

    @ApiModelProperty("商家id")
    private Long shopId;

    @ApiModelProperty("用户id")
    private String userId;

    @ApiModelProperty("好友头像")
    @JsonSerialize(using = ImgJsonSerializer.class)
    private String pic;

    @ApiModelProperty("好友昵称")
    private String friendName;

    @ApiModelProperty("最新一条消息内容")
    private String latestMsg;

    @ApiModelProperty("未读消息计数")
    private Integer unread;

    @ApiModelProperty("最新消息的时间戳")
    private Long timestamp;

    @ApiModelProperty("最新消息的时间")
    private String timeStr;

    @ApiModelProperty("最后的消息时间")
    private Date latestMsgTime;

    @ApiModelProperty("消息类型 0文字1商品信息2图片")
    private Integer type;

    @ApiModelProperty("店铺状态(-1:未开通 0: 停业中 1:营业中)")
    private Integer shopStatus;

    @ApiModelProperty("员工id")
    private Long employeeId;

    @ApiModelProperty("是否在线")
    private Boolean isOnline;
}
